package net.openvision.music.model;

public class TimeSignature {
	Length value;

	public TimeSignature(int numerator, int denominator) {
		value = new Length(numerator, denominator);
	}

	/**
	 * Computes the number of entities of given length that could be put into
	 * one bar that has this time signature.
	 * 
	 * @param l
	 *            The length.
	 * @return The number of entities with length l that could be put into one
	 *         bar.
	 */
	public int multipleOf(Length l) {
		return (int) (value.getValue() / l.getValue());
	}
}
